package com.easygem.front.converter;

import com.easygem.common.model.front.Blacklist;
import com.easygem.common.vo.front.BlacklistVo;
import org.springframework.beans.BeanUtils;


/**
 * @author luoxi
 * @version 1.0
 * @className BlacklistConverter
 * @Description 黑名单
 * 用于返回给前端的实体转换器
 * @date 2024/12/23 20:03
 */
public class BlacklistConverter {
    /**
     * 转vo  ,用于返回给前端的实体
     * @return
     */
    public static BlacklistVo converterToBlacklistVo(Blacklist blacklist){
        BlacklistVo blacklistVo = new BlacklistVo();
        BeanUtils.copyProperties(blacklist,blacklistVo);
        return blacklistVo;
    }

    public static Blacklist converterToBlacklist(BlacklistVo blacklistVo){
        Blacklist blacklist = new Blacklist();
        BeanUtils.copyProperties(blacklistVo,blacklist);
        return blacklist;
    }
}
